<!DOCTYPE HTML>
<html>
<head>
<empty name="visitor">
<script>
    //var POPUP_REG = true; 
</script>
</empty>
<include file="Public:head" />
</head>

<body>
<include file="Public:header" />
<!--main-->
<div class="midder">

<div class="mc">
<div id="group-info">
	<img align="left" alt="{$strGroup['groupname']}" src="{$strGroup['icon_48']}" class="pil mr10 groupicon"/>
    <h1 class="group_tit">{$strGroup['groupname']}<if condition="$strGroup['isaudit'] eq 1"><font class="red">[审核中]</font></if></h1>

    <div class="group-misc">
    <if condition="$isGroupUser && ($strGroup['userid']!=$visitor['userid'])">
    
    <span class="fleft mr5 color-gray">我是这个小组的{$strGroup['role_user']} <a class="j a_confirm_link" href="{:U('group/index/quit',array('id'=>$strGroup['groupid']))}" style="margin-left: 6px;">&gt;退出小组</a></span>
    
    <elseif condition="$isGroupUser && ($strGroup['userid']==$visitor['userid'])" />
    
    <span class="fleft mr5 color-gray">我是这个小组的{$strGroup['role_leader']}</span>
    </if>
    <if condition="$strGroup['joinway'] eq 0 && !$isGroupUser">
                <a rel="nofollow" class="button-join" href="{:U('group/index/join',array('id'=>$strGroup['groupid']))}">
                    <span>加入小组</span>
                </a>
    </if>
	<if condition ="$strGroup['joinway'] neq 0">
    	<span>本小组禁止加入</span>
    </if>
	</div>
    
</div>

<div class="cleft">
<div class="infobox">

<div class="bd">
    <p>创建于<php>echo date('Y-m-d',$strGroup['addtime'])</php>&nbsp; &nbsp; {$strGroup['role_leader']}：<a href="{:U('space/index/index',array('id'=>$strLeader['doname']))}">{$strLeader['username']}</a></p>
    <php>echo nl2br($strGroup['groupdesc']);</php>
</div>

</div>

<div class="box">

<div class="box_content">

    <h2 style="margin-top:10px">
                <a class="rr bn-post" href="{:U('group/topic/add',array('id'=>$strGroup['groupid']))}"><span>+发言</span></a>
        最近小组话题  · · · · · ·
    </h2>

<div class="clear"></div>

            <div class="indent">
                <table class="olt">
                    <tbody>
                        <tr>
                            <td>话题</td>
                            <td nowrap="nowrap">作者</td>
                            <td nowrap="nowrap">回应</td>
                            <td align="right" nowrap="nowrap">最后回应</td>
                        </tr>
            <if condition="!empty($arrTopic)">
            <foreach name="arrTopic" item="item">
                            <tr class="pl">
                                <td class="td-title">
                                <a title="{$item['title']}" href="{:U('group/topic/show',array('id'=>$item['topicid']))}">
                                <php>echo sub_str($item['title'], 25);</php>
                                </a>
                                <if condition="$item['isvideo'] eq 1">
                                <img src="__PUBLIC__/Static/images/lc_cinema.png" align="absmiddle" title="[视频]" alt="[视频]" />
                                </if>                
                                <if condition="$item['istop'] eq 1">
                                <img src="__PUBLIC__/Static/images/headtopic_1.gif" title="[置顶]" alt="[置顶]" />
                                </if>
                                <if condition="$item['addtime'] gt (strtotime(date('Y-m-d 00:00:00')))">
                                <img src="__PUBLIC__/Static/images/topic_new.gif" align="absmiddle"  title="[新帖]" alt="[新帖]" />
                                </if> 
                                <if condition="$item['isphoto'] eq 1">
                                <img src="__PUBLIC__/Static/images/image_s.gif" title="[图片]" alt="[图片]" align="absmiddle" />
                                </if> 
                                <if condition="$item['isattach'] eq 1">
                                <img src="__PUBLIC__/Static/images/attach.gif" title="[附件]" alt="[附件]" />
                                </if> 
                                <if condition="$item['isdigest'] eq 1">
                                <img src="__PUBLIC__/Static/images/posts.gif" title="[精华]" alt="[精华]" />
                                </if>
            					</td>
                                <td nowrap="nowrap"><a href="{:U('space/index/index',array('id'=>$item['user']['doname']))}">{$item['user']['username']}</a></td>
                                <td nowrap="nowrap" ><if condition="$item['count_comment']">{$item['count_comment']}</if></td>
                                <td nowrap="nowrap" class="time" align="right"><php> echo getTime($item['uptime'],time())</php></td>
                            </tr>
            </foreach>
            </if>         
                </tbody>
              </table>
            </div>

	<div class="clear"></div>
    
	<div class="page"></div>

</div>
</div>

</div>


<div class="cright">
    <div>
        <h2>最新加入成员</h2>
        <foreach name="arrGroupUser" item="item">
        <dl class="obu">
            <dt>
            <a href="{:U('space/index/index',array('id'=>$item['doname']))}"><img alt="{$item['username']}" class="m_sub_img" src="{$item['face']}" /></a>
            </dt>
            <dd>{$item['username']}<br>
                <span class="pl">({$item['area']['areaname']})</span>
            </dd>
     	 </dl>
        </foreach>
    
        <br clear="all">
    
        <if condition="$visitor['userid'] eq $strGroup['userid']">
            <p class="pl2">&gt; <a href="{:U('group/index/group_user',array('groupid'=>$strGroup['groupid']))}">成员管理 ({$strGroup['count_user']})</a></p>
            
            <p class="pl2">&gt; <a href="{:U('group/index/edit',array('d'=>'base','groupid'=>$strGroup['groupid']))}">修改小组设置 </a></p>
            
            <else />
            
            <p class="pl2">&gt; <a href="{:U('group/index/group_user',array('groupid'=>$strGroup['groupid']))}">浏览所有成员 ({$strGroup['count_user']})</a></p>
        </if>
        
       <div class="clear"></div>

        
    </div>
    
	<p class="pl">本页永久链接: <a href="__SITE_URL__group/{$strGroup['groupid']}">__SITE_URL__group/{$strGroup['groupid']}</a></p>
    
    <p class="pl"><span class="feed"><a href="{:U('group/index/rss',array('id'=>$strGroup['groupid']))}">feed: rss 2.0</a></span></p>
    
    <div class="clear"></div>
    
</div>
</div>
</div>

<include file="Public:footer" />
</body>
</html>